//app.js
const settings_url = require('./config').settings_url
const categorys_url = require('./config').categorys_url
App({
  globalData: {
  },
  onLaunch: function () {
    var self = this
    wx.request({
      url: settings_url,
      header: {
        'content-type': 'application/json'
      },
      success: function (res) {
        wx.setStorage({
          key: "settings",
          data: res.data
        })
      }
    })
    wx.request({
      url: categorys_url,
      header: {
        'content-type': 'application/json'
      },
      success: function (res) {
        wx.setStorage({
          key: "categorys",
          data: res.data
        })
      }
    })
    
  }
})


